# -*- coding: utf-8 -*-
# Author: xiantingDeng
# File: 03_slots__的作用.py
# Time: 20:41


class Person(object):
    __slots__ = ("name","age") # 不能额外添加属性
    def __init__(self,name,age):
        self.name = name
        self.age = age

P = Person("开发",20)
P.score = 200
print(P.score)